local PANEL = {}
local FontHeight = 10

/*
local Alt1Color = Color(80, 80, 80, 255 )
local Alt2Color = Color(120, 120, 120, 255 )
local SelColor =  Color( 155, 155, 155, 255 )
*/

function PANEL:Init()
	self.Text = ""
	self.AltType = true
	self.Table = nil
	
	FontHeight = draw.GetFontHeight("Default")
	
	self:SetTall( FontHeight + 2 )
	self:SetContentAlignment( 4 ) 
	self:SetTextInset( 5 )
	
end

function PANEL:SetAlt( state )
	self.AltType = state
end

function PANEL:SetSelected( state )
	self.Selected = state
end

function PANEL:SetTable( tbl )
	self.Table = tbl
end

function PANEL:OnMousePressed( mcode )

	if ( mcode == MOUSE_LEFT ) then
		self:OnSelect()
	end
	
end

/*---------------------------------------------------------
   Name: OnMousePressed
---------------------------------------------------------*/
function PANEL:OnCursorMoved( x, y )

	if ( input.IsMouseDown( MOUSE_LEFT ) ) then
		self:OnSelect()
	end
	
end

function PANEL:OnSelect()
end

/*
function PANEL:ResetColor()
	
	if self.Selected == true then
		self.DrawColor = SelColor
	else
		
		if self.AltType == true then
			self.DrawColor = Alt1Color
		else
			self.DrawColor = Alt2Color
		end
		
	end
	
end
*/
/*
function PANEL:Paint()
	
	draw.RoundedBox( 8, 0, 0, self:GetWide(), self:GetTall(), self.DrawColor )
	
	surface.SetFont( "Default" )
	surface.SetTextPos( 5, self:GetTall() * 0.5 - FontHeight * 0.5 )
	surface.SetTextColor( 255, 255, 255, 255 )
	surface.DrawText( self.Text )
	
end
*/

function PANEL:Paint()

	if self.Selected == false then
		if self.AltType == false then return end
		surface.SetDrawColor( 255, 255, 255, 10 )
	else
		surface.SetDrawColor( 50, 150, 255, 250 )
	end
	
	self:DrawFilledRect()
	
end




vgui.Register( "UpgradesItem", PANEL, "DButton" )